<#macro frontPage page url params>
<div id="" class="page" style="text-align:center;">
<#if page??>
	<a href=<#if page.currentPageNo gt 1>"${url}?pageno=1${params}"<#else>"javascript:void(0);"</#if>>首页</a>
	<a href=<#if page.currentPageNo gt 1>"${url}?pageno=${page.currentPageNo-1}${params}"<#else>"javascript:void(0);"</#if>>上一页</a>
	<#if page.currentPageNo+2 lt page.totalpages+1>
		<#assign s = page.currentPageNo-3>
		<#list s..page.currentPageNo as p>
			<#if p gt 0>
				<#if p=page.currentPageNo>
					<span style="color: red;">${p}</span>
				<#else>
					<a href="${url}?pageno=${p}${params}">${p}</a>
				</#if>
			</#if>
		</#list>
		<#if s lt 0>
			<#list page.currentPageNo+1..page.currentPageNo+5 as p>
				<#if p lt page.totalpages+1>
					<#if p=page.currentPageNo>
						<span style="color: red;">${p}</span>
					<#else>
						<a href="${url}?pageno=${p}${params}">${p}</a>
					</#if>
				</#if>
			</#list>
		<#elseif s==0>
			<#list page.currentPageNo+1..page.currentPageNo+3 as p>
				<#if p lt page.totalpages+1>
					<#if p=page.currentPageNo>
						<span style="color: red;">${p}</span>
					<#else>
						<a href="${url}?pageno=${p}${params}">${p}</a>
					</#if>
				</#if>
			</#list>
		<#else>
			<#list page.currentPageNo+1..page.currentPageNo+2 as p>
				<#if p=page.currentPageNo>
					<span style="color: red;">${p}</span>
				<#else>
					<a href="${url}?pageno=${p}${params}">${p}</a>
				</#if>
			</#list>
		</#if>

	<#else>
		<#list page.totalpages-5..page.totalpages as p>
			<#if p gt 0>
				<#if p=page.currentPageNo>
					<span style="color: red;">${p}</span>
				<#else>
					<a href="${url}?pageno=${p}${params}">${p}</a>
				</#if>
			</#if>
		</#list>
	</#if>
	<a href=<#if page.currentPageNo lt page.totalpages>"${url}?pageno=${page.currentPageNo+1}${params}"<#else>"javascript:void(0);"</#if>>下一页</a>
	<a href=<#if page.currentPageNo lt page.totalpages>"${url}?pageno=${page.totalpages}${params}"<#else>"javascript:void(0);"</#if>>尾页</a>
</#if>
</div>
</#macro>